#include <iostream>
using namespace std;

class RMB {
public:
	RMB(int y = 0) :yuan(y) {}
	RMB operator+(RMB r);
	RMB & operator--();
	friend ostream & operator<<(ostream &out, RMB &r);
	bool operator>(const RMB &r);
	operator int();

private:
	int yuan;
};


//int main() {
//	RMB r1(6), r2(9), r3(15);
//	r3 = r1 + r2;
//	--r3;
//	cout << r3 << endl;
//	if (r1 > r2) {
//		cout << "r1>r2" << endl;
//	}
//	else {
//		cout << "r1<=r2" << endl;
//	}
//	int d = r3;
//	cout << "d=" << d << endl;
//	return 0;
//}

RMB RMB::operator+(RMB r) {
	RMB temp;
	temp.yuan = this->yuan + r.yuan;
	return temp;
}

RMB & RMB::operator--() {
	this->yuan--;
	return *this;
}

bool RMB::operator>(const RMB & r) {
	return this->yuan>r.yuan;
}

RMB::operator int() {
	return this->yuan;
}

ostream & operator<<(ostream & out, RMB & r) {
	out << r.yuan << "Ԫ" << endl;
	return out;
}
